package com.test.netty;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

@RestController
public class MyController {

    @GetMapping("/endpoint")
    public Mono<String> handleRequest() throws InterruptedException {
        return Mono.just("Hello, World!");
    }

    @PostMapping("/handleRequest2")
    public String handleRequest2() throws InterruptedException {
//        Thread.sleep(100000);
        System.out.println(System.currentTimeMillis());
        return System.currentTimeMillis() + "";
    }
}
